//  -------------------- iSharePoint -------------------- //
// 
//  Company:	IT Complex, LLC
//  Project:	Smart.Common
//  File name:	SqlFacadeMappingInfo.cs
//  Developer:	Solomatov Igor
//  Created:	15.04.2012
// 
//  -------------------- iSharePoint -------------------- //

namespace Smart.Common
{
	/// <summary>
	/// SQL facade mapping info
	/// </summary>
	public class SqlFacadeMappingInfo : FacadeMappingInfo
	{
		/// <summary>
		/// Table type
		/// </summary>
		public SqlObjectType ObjectType { get; set; }

		/// <summary>
		/// Primary key column name
		/// </summary>
		public string PrimaryKey { get; set; }

		/// <summary>
		/// Title key column name
		/// </summary>
		public string TitleKey { get; set; }

		/// <summary>
		/// Stored Procedure for adding items
		/// </summary>
		public string SPAdd { get; set; }

		/// <summary>
		/// Stored Procedure for updating items
		/// </summary>
		public string SPUpdate { get; set; }

		/// <summary>
		/// Stored Procedure for deleting items
		/// </summary>
		public string SPDelete { get; set; }

		/// <summary>
		/// Stored procedure ResultCode column name
		/// </summary>
		public string ResultCodeKey { get; set; }

		/// <summary>
		/// Stored procedure ResultDescription column name
		/// </summary>
		public string ResultDescriptionKey { get; set; }

		/// <summary>
		/// SQL facade mapping info
		/// </summary>
		public SqlFacadeMappingInfo(string facadeName, string tableName, SqlObjectType tableType, string primaryKey, string titleKey)
			: base(facadeName, tableName)
		{
			ObjectType = tableType;
			PrimaryKey = primaryKey;
			TitleKey = titleKey;
		}
	}
}